package com.le.tester.javaThink.fifth.chapter14_StreamingProgramming;

import java.io.IOException;
import java.util.ArrayList;

/**
 * 描述：特殊集合
 */
public class SpecialCollector {
    public static void main(String[] args) throws IOException {
        ArrayList<Object> words = FileToWords.stream("E:\\L.info\\L.Application\\L.Tester\\src\\main\\java\\com\\le\\tester\\java8\\doc\\Cheese.dat")
                .collect(ArrayList::new, ArrayList::add, ArrayList::addAll);

        words.stream()
                .filter(s -> s.equals("cheese"))
                .forEach(System.out::println);

    }
}
